<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Time_model extends CI_Model
{
	
	public function __construct()
	{
		parent::__construct();
	}
	
	public function get_user_details($id)
	{
		$this->db->select('users.*,users_groups.*');
		$this->db->from('users');
		$this->db->where('users.id = '.$id);
		$this->db->join('users_groups','users.id = users_groups.user_id');
		return $this->db->get()->row_array();
	}
	public function get_entry_time($id,$date,$month,$year)
	{
		$this->db->select('*');
		$this->db->from('attendance_timings');
		$array = array('user_id' =>$id, 'date_id' => $date, 'month_id' => $month, 'year_id' => $year);
		$this->db->where($array);
		return $this->db->get()->row_array();
	}
	

	
}
